package graduate.wangyaqi.ProgrammeQuestions;

import graduate.wangyaqi.OnlyQuestions.OnlyQuestions;
import org.springframework.data.repository.CrudRepository;

import java.util.Optional;

public interface ProgrammeQuestionsRepository extends CrudRepository<ProgrammeQuestions,Long> {
    Iterable<ProgrammeQuestions> findAllByTaotiID(long taotiID);

    int countAllByTaotiID(Long taotaoId);

    ProgrammeQuestions getFirstByTaotiIDAndIdGreaterThan(long taotiId, long id);

    ProgrammeQuestions getFirstByTaotiIDAndIdLessThanOrderByIdDesc(long taotiId, long id);

    @Override
    Optional<ProgrammeQuestions> findById(Long aLong);
}
